home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
amos
/
sillysource1.lha
/
COLOURING BOOK.AMOS
/
COLOURING BOOK.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1996-09-07
|
3KB
|
118 lines
Screen Open 1,320,256,16,Lowres : Curs Off : Flash Off : Screen Hide 1 : Hide On
Unpack 10 To 1
Dir$=Dir$+"COLBOOK"
Track Play 3 : Break Off
Repeat
Inc CHECK : P$="COLOUR"+Str$(CHECK)-" "+".ABK"
If Exist(P$) Then Inc ESCR
Until Exist(P$)=0
Wait 20 : While Mouse Key=0 : Wend
Track Stop : Fade 3 : Wait 45 : Track Play 4
Screen Open 2,320,200,16,Lowres : Curs Off : Screen Hide 2
Screen Open 3,320,200,16,Lowres : Curs Off : Screen Hide 3 : SE=2 : SCR=1 : CO=1
Dim ZX(25),ZY(25) : MUS=1 : Track Loop On
ERRM:
Unpack 6 To 2 : Screen 2
Unpack 5 To 1 : Wait Vbl
Screen Copy 2 To 3
Screen Copy 2,64,6,315,143 To 1,64,6
Locate 25,19 : Paper 0 : Print Space$(3) : Locate 25,19 : Print SCR
SETUP:
Reserve Zone 25 : Restore : Show On
For X=1 To 25
Read A,B,C,D : ZX(X)=A : ZY(X)=B : Set Zone X,A,B To C,D
Next X
Reset Zone 1
MAIN:
Bob 1,ZX(SE),ZY(SE),1
Ink CO : Wait 20 : Repeat
CH=Mouse Zone : X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
Until Mouse Key=1 and CH<>0
Rem CHOOSE A COLOUR
If CH<17 Then Ink CH-1 : CO=CH-1 : SE=CH : Goto MAIN
Rem TOGGLE MUSIC ON AND OFF
If CH=21 and MUS=0 Then MUS=1 : Track Play 4 : Goto MAIN
If CH=21 and MUS=1 Then MUS=0 : Track Stop : Goto MAIN
Rem QUIT THE GAME
If CH=23 Then Track Stop : Hide On : Wait 20 : Fade 3 : Wait 60 : Screen Hide 2 : Screen Hide 3 : End
Rem START AGAIN
If CH=20 Then Bob Off : Wait Vbl : Screen Copy 3 To 2 : Screen Copy 2,64,6,315,143 To 1,64,6 : Goto MAIN
Rem LOOK AT PICTURE
If CH=17
Bob Off : Hide On : Screen To Back 1 : Screen To Front 2
Wait 20 : While Mouse Key=0 : Wend
Screen To Front 1
Show On : Goto MAIN
End If
Rem SAVE A PICTURE
If CH=22
D$=Dir$ : Bob Off
Screen To Back 1
P$="COLOUR"+Str$(SCR)-" "+".IFF"
F$=Fsel$("*.IFF",P$)
If F$=""
Dir$=D$ : Goto DEANO
End If
SPACE=Dfree
If SPACE<30000
Boom : Wait 20
Dir$=D$ : Goto DEANO
End If
Screen To Front 2 : Screen 2
Save Iff F$
DEANO:
Screen To Front 1 : Screen 1 : Reset Zone : Dir$=D$ : Goto SETUP
End If
Rem PRINT PICTURE
If CH=19
D$=Dir$ : Bob Off : Printer Open
Screen To Back 1 : Screen To Front 2 : Screen 2 : Wait 50
If Printer Online=-1
Printer Dump
Printer Close : Goto DEANO
End If
Printer Close : Goto DEANO
End If
Rem LOAD ANOTHER PICTURE
If CH=24 or CH=25 Then Goto PICCY
Rem PAINT THE AREA
If CH=18
Bob Off : Screen To Back 1 : Screen To Front 2
End If
Wait 20 : Screen 2 : Repeat
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
TEST=Point(X,Y)
If Mouse Key=1 and TEST<>0 Then Ink CO : Paint X,Y : Wait 10
Until Mouse Key=2
Screen To Front 1
Screen Copy 2,64,6,315,143 To 1,64,6
Screen 1 : Reset Zone : Goto SETUP
PICCY:
If CH=24 and SCR=1 Then Goto MAIN
If CH=24 and SCR>1 Then Dec SCR
If CH=25 and SCR=ESCR Then Goto MAIN
If CH=25 and SCR<ESCR Then Inc SCR
F$="COLOUR"+Str$(SCR)-" "+".ABK"
Erase 6 : Load F$,6 : Reset Zone : Goto ERRM
Goto MAIN
Data 5,5,30,21,5,25,30,42,5,45,30,62,5,65,30,82,5,85,30,102,5,105,30,122
Data 5,125,30,142,5,145,30,162,34,5,60,22,34,25,60,42,34,45,60,62,34,65
Data 60,82,34,85,60,102,34,105,60,122,34,125,60,142,34,145,60,162
Data 5,167,60,195
Data 65,168,94,195
Data 98,168,128,195
Data 130,168,185,195
Data 188,168,245,195
Data 248,168,315,195
Data 248,147,315,163
Data 190,150,200,161
Data 232,150,243,161